package com.woniuxy.ssm.service;

import com.woniuxy.ssm.entity.User;
import com.woniuxy.ssm.mapper.UserMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @program: JavaEE-EFD
 * @description:
 * @author: fengjd
 * @create: 2022-07-29 09:48
 **/

@Service
@Transactional(readOnly = true) // readOnly=true 要求此类下的方法只能 读取数据库,不可增删改,会报错 connot execute statement in a read-only transaction
public class UserService {

    private UserMapper userMapper;

    public User validateUserInfo(User user) {
        return this.userMapper.validateUserInfo(user);
    }

}
